removing that stupid is_a warning.
Published 2005-03-17 16:33:33
My new pet hate about PHP5 is currently the rather stupid warning:
"Strict Standards: is_a(): Deprecated. Please use the instanceof operator in"
Why on earth is that in there? instance of requires that the class or interface you are testing against exists. That means loading code that may not actually be used if you are using negative testing.
That shouts out ineffeciency, and doesnt really give you and readibility or particularly major gains in terms of code doing the testing for you.
It's about the only warning that PHP4 code emits when running under E_STRICT if you disable it when loading the code.
here is the simple patch to get rid of this crazyness..
"Strict Standards: is_a(): Deprecated. Please use the instanceof operator in"
Why on earth is that in there? instance of requires that the class or interface you are testing against exists. That means loading code that may not actually be used if you are using negative testing.
That shouts out ineffeciency, and doesnt really give you and readibility or particularly major gains in terms of code doing the testing for you.
It's about the only warning that PHP4 code emits when running under E_STRICT if you disable it when loading the code.
here is the simple patch to get rid of this crazyness..
--- zend_builtin_functions.c 1 Feb 2005 19:05:56 -0000 1.256
+++ zend_builtin_functions.c 17 Mar 2005 08:20:42 -0000
@@ -672,7 +672,6 @@
Returns true if the object is of this class or has this class as one of its parents */
ZEND_FUNCTION(is_a)
{
- zend_error(E_STRICT, "is_a(): Deprecated. Please use the instanceof operator");
is_a_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */
Mentioned By:
google.com : is_a(): Deprecated. Please use the instanceof operator (239 referals)
google.com : april (61 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community (51 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community... (42 referals)
google.com : is_a(): Deprecated (40 referals)
google.com : Deprecated. Please use the instanceof operator (39 referals)
google.com : march (37 referals)
google.com : Strict Standards: is_a(): Deprecated. (35 referals)
google.com : Strict Standards: is_a(): Deprecated. Please use the instanceof operator (34 referals)
google.com : Strict Standards: is_a(): Deprecated. Please use the instanceof operator in (28 referals)
google.com : is_a(): Deprecated. Please use the instanceof operator in (27 referals)
google.com : Strict Standards: is_a(): Deprecated (27 referals)
google.com : php remove warning (25 referals)
google.com : php is_a deprecated (22 referals)
google.com : "is_a(): Deprecated. Please use the instanceof operator" (20 referals)
google.com : december (20 referals)
www.planet-php.net : Planet PHP (16 referals)
php.zend.com : Zend Technologies - Weekly Summaries - Issue # 241 (15 referals)
google.com : is_a deprecated (15 referals)
google.com : Please use the instanceof operator (14 referals)
google.com : is_a(): Deprecated. Please use the instanceof operator (239 referals)
google.com : april (61 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community (51 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community... (42 referals)
google.com : is_a(): Deprecated (40 referals)
google.com : Deprecated. Please use the instanceof operator (39 referals)
google.com : march (37 referals)
google.com : Strict Standards: is_a(): Deprecated. (35 referals)
google.com : Strict Standards: is_a(): Deprecated. Please use the instanceof operator (34 referals)
google.com : Strict Standards: is_a(): Deprecated. Please use the instanceof operator in (28 referals)
google.com : is_a(): Deprecated. Please use the instanceof operator in (27 referals)
google.com : Strict Standards: is_a(): Deprecated (27 referals)
google.com : php remove warning (25 referals)
google.com : php is_a deprecated (22 referals)
google.com : "is_a(): Deprecated. Please use the instanceof operator" (20 referals)
google.com : december (20 referals)
www.planet-php.net : Planet PHP (16 referals)
php.zend.com : Zend Technologies - Weekly Summaries - Issue # 241 (15 referals)
google.com : is_a deprecated (15 referals)
google.com : Please use the instanceof operator (14 referals)
Follow us
-
- Some thoughts on the language server and its usefulness in the roobuilder
- Roo Builder for Gtk4 moving forward
- Clustered Web Applications - Mysql and File replication
- GitLive - Branching - Merging
- PDO_DataObject Released
- PDO_DataObject is under way
- Mass email Marketing and anti-spam - some of the how-to..
- Hydra - Recruitment done right
Blog Latest
-
Twitter - @Roojs